<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>吉车惠后台管理系统</title>
    <%@include file="/global/global-other.jsp" %>

    <script type="text/javascript">
        var $credit_inout_detail_qd_list = new Object();
        var $credit_inout_detail_qd_list_Datagrid;
        var $credit_inout_detail_qd_list_toolbar = [{
                text:'<i class="fa fa-search" aria-hidden="true"></i>刷新',
                handler:function(){
                    $credit_inout_detail_qd_list.reload();
                }
            }
        ];
        $(function(){
            //gird 初始化
            $credit_inout_detail_qd_list_Datagrid = $('#credit_inout_detail_qd_list_Datagrid').datagrid({
                filterBtnIconCls:'icon-filter',
                queryParams: {
                    "filter_EQ_a.delete_status" : 0,
                    "filter_EQ_a.credit_source" : "04"
                },
                pageSize : 20,
                remoteFilter:true
            });

            $credit_inout_detail_qd_list_Datagrid.datagrid('enableFilter', [
                {field:'phone',type:'label'},
                {field:'name',type:'label'},
                {field:'credit',type:'label'},
                {field:'inoutStatus',type:'label'},
                {field:'inoutAt',type:'label'},
                {field:'t',type:'label'}
            ]);

        });

        //刷新

        $credit_inout_detail_qd_list.reload = function(){
            $credit_inout_detail_qd_list_Datagrid.datagrid('reload');
        };

    </script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false">
        <table id="credit_inout_detail_qd_list_Datagrid"  style="width:100%;height:100%"
               data-options="border:false,rownumbers:true,autoRowHeight:false,singleSelect:true,pagination:true,sortName:'inoutAt',sortOrder:'desc',toolbar:$credit_inout_detail_qd_list_toolbar,rowStyler: function(index,row){return {style:'height:30px'};},url:'${ctx}/tjfx/credit/inout/detail/qd/search?_m=load',method:'post'">
            <thead>
            <tr>
                <th data-options="field:'phone',width:120,align:'center'">手机用户</th>
                <th data-options="field:'name',width:120,align:'center'">真实姓名</th>
                <th data-options="field:'credit',width:100,align:'center'">获取积分</th>
                <th data-options="field:'inoutStatus',width:100,align:'center',formatter:
                    function(value,row,index){
                        if(row.inoutStatus=='1'){
                            return '<span style=\'color:green\'>收入</span>';
                        }else if(row.inoutStatus=='2'){
                            return '<span style=\'color:red\'>支出</span>';
                        }
                    }
                ">收支状态</th>
                <th data-options="field:'inoutAt',width:150,align:'center'">收支时间</th>
                <th data-options="field:'t',width:20,align:'center'"></th>
            </tr>
            </thead>
        </table>
    </div>
</div>
</body>
</html>